#ifndef __ROUTE_H
#define __ROUTE_H
#include <stdint.h>
#include <stdlib.h>
#include "./link.h"
#include "riselib/mempool.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct Route {
  uint8_t* id;
  LinkCfgStruct* link;
} RouteStruct;  //底层连接配置结构

#define ROUTES_NUM_MAX 64

extern RouteStruct* route_links[];
extern uint16_t route_len;

int16_t route_update(uint8_t* id, LinkCfgStruct* link);
void route_fix(uint8_t* id);
void route_remove(uint8_t* id);
RouteStruct* route_find(uint8_t* id);

#ifdef __cplusplus
}
#endif
#endif  //__ROUTE_H
